<!-- start user-form  -->
<?php $user = $user[0];?>
<form method="POST">
<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
<tr>
	<th valign="top">Username:</th>
	<td><input type="text" class="inp-form" name="username" value="<?php echo $user['username'];?>"/></td>
	<td></td>
</tr>
<tr>
	<th valign="top">Password:</th>
	<td><input type="text" class="inp-form" name="password"/></td>
	<td></td>
</tr>
<tr>
	<th valign="top">Aktif:</th>
	<td>	
		<select name="aktif" class="styledselect_form_1">
			<option value="0" <?php echo ($user['aktif'] == NOT_ACTIVE_ACCOUNT) ? "selected=selected" : "" ;?>>Tidak Aktif</option>
			<option value="1" <?php echo ($user['aktif'] == ACTIVE_ACCOUNT) ? "selected=selected" : "" ;?>>Aktif</option>
		</select>
	</td>
	<td></td>
</tr>
<tr>
	<th valign="top">Level:</th>
	<td>
		<select id="level" name="level" class="styledselect_form_1">
			<option value="1" <?php echo ($user['level'] == ADMIN_TYPE) ? "selected=selected" : "" ;?> >Admin</option>
			<option value="2" <?php echo ($user['level'] == ALUMNI_TYPE) ? "selected=selected" : "" ;?> >Alumni</option>
		</select>
	</td>
	<td></td>
</tr> 
<tr <?php if($user['level'] == ADMIN_TYPE){ ?> style="display:none" <?php } ?> id="alumni_form">
	<td colspan="2">
		<table>
		<tr>
			<th valign="top">Nama Lengkap</th>
			<td><input type="text" name="nama" class="inp-form" value="<?php echo $user['nama'];?>"/></td>
		</tr>
		<tr>
			<th valign="top">Gender</th>
			<td>
				<select name="jk" class="styledselect_form_1">
					<option value="p" <?php echo ($user['jk'] == 'p') ? "selected=selected" : "" ;?>>Perempuan</option>
					<option value="l" <?php echo ($user['jk'] == 'l') ? "selected=selected" : "" ;?>>Laki-laki</option>
				</select>
			</td>
		</tr>
		<tr>
			<th valign="top">Pekerjaan</th>
			<td><input type="text" name="pekerjaan" class="inp-form" value="<?php echo $user['pekerjaan'];?>"/></td>
		</tr>
		<tr>
			<th valign="top">Alamat</th>
			<td><textarea name="alamat" class="form-textarea" /><?php echo $user['alamat'];?></textarea></td>
		</tr>
		<tr>
			<th valign="top">Telepon</th>
			<td><input type="text" name="telepon" class="inp-form" value="<?php echo $user['telepon'];?>"/></td>
		</tr>
		<tr>
			<th valign="top">E-mail</th>
			<td><input type="text" name="email" class="inp-form" value="<?php echo $user['email'];?>"/></td>
		</tr>
		<tr>
			<th valign="top">Handphone</th>
			<td><input type="text" name="hp" class="inp-form" value="<?php echo $user['hp'];?>"/></td>
		</tr>
		<tr>
			<th valign="top">Status</th>
			<td>
				<select name="status" class="styledselect_form_1">
					<option value="belum menikah" <?php echo ($user['status'] == 'belum menikah') ? "selected=selected" : "" ;?>>Belum Menikah</option>
					<option value="menikah" <?php echo ($user['status'] == 'menikah') ? "selected=selected" : "" ;?>>Sudah Menikah</option>
				</select>
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<th>&nbsp;</th>
	<td valign="top">
		<input type="submit" name="edit_user" value="" class="form-submit" />
		<input type="reset" value="" class="form-reset"  />
	</td>
	<td></td>
</tr>
</table>
</form>
<div class="clear">&nbsp;</div>
<!-- end user-form  -->
<script type="text/javascript">
$(function(){
	$('#level_container').click(function(){
		var level = $("#level_input").val();	
		if(level == "Alumni"){		
			$("#alumni_form").show();
		}else if(level == "Admin"){
			$("#alumni_form").hide();
		}
	});
});
</script>  